package lifeimprint.BluetoothSample;

import java.util.ArrayList;

import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BtDiscoverReceiver extends BroadcastReceiver{

	private ArrayList<BluetoothDevice>myDevices=null;
	private BluetoothDevice device=null;
	
	public BtDiscoverReceiver(ArrayList<BluetoothDevice>devices){
		super();
		myDevices=devices;
	}
	@Override
	public void onReceive(Context context, Intent intent) {
		// TODO Auto-generated method stub
		String action=intent.getAction();
		Log.d("mydebug", action);
		if(BluetoothDevice.ACTION_FOUND.equals(action)){
			BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
			Log.d("mydebug", device.getAddress()+"|"+device.getName());
		}
		else{
			return;
		}

	}

}
